Skip to content

Add header-only SegmentedNumber piecewise quantized type - #13

Open
NikolayChirkov wants to merge 4 commits into
mainfrom
feature/segmented-number
Open

Add header-only SegmentedNumber piecewise quantized type#13
NikolayChirkov wants to merge 4 commits into
mainfrom
feature/segmented-number

Conversation

@NikolayChirkov

Copy link
Copy Markdown
Collaborator

Summary

  • Add ae::seg::Format / Compile<Spec> (SegmentedNumber): header-only C++20 piecewise-quantized numbers that store only runtime_type and serialize a packed rank through uint8_t or TieredInt.
  • Keep existing TieredInt, FixedPoint, and Exponential wire formats and APIs unchanged.
  • Cover the seven golden formats (temperature, humidity, CO2, RX window, RSSI, battery, connect duration), Formula vs Lookup, wire IO, floating runtime opt-in, compile-fail tests, and Release footprint targets.

Test plan

  • Debug GCC 14.1: ctest --test-dir build-segmented --output-on-failure (18/18)
  • Release GCC 14.1: ctest --test-dir build-segmented-rel --output-on-failure (18/18)
  • CI GCC/Clang/MSVC

NikolayChirkov and others added 4 commits August 28, 2026 17:24
…al values.

Keep existing TieredInt/FixedPoint/Exponential wire formats unchanged and compile the packed rank from an independent curve layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce CyclicCounter for truncated modular wire counters with
nearest unambiguous full-value restore and TryAdvance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop wire_traits for CyclicCounter so truncated wire values cannot
be mistaken for a full counter without a live restore base.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant